package com.house.service.impl;

import com.house.entity.User;
import com.house.reportisy.CityRepository;
import com.house.service.CityService;
import com.house.utils.Constant;
import com.house.vo.CityVO;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @version 1.0
 * @Author OhygC
 * @since 1.0
 */
@Service
public class CityServiceImpl implements CityService {
    @Resource
    private CityRepository cityRepository;

    @Override
    public List<Map<String, CityVO>> findAllCity(Map<String,Object> params) {

        return cityRepository.findCitys(Constant.DEL_FLAG);
    }

    @Override
    public int findTatol(Map<String, Object> params) {
        return cityRepository.countByDelFlagIs(Constant.DEL_FLAG);
    }

    @Override
    public Page<User> findUsersByName(Map<String, Object> params) {
        return null;
    }
}
